//
//  Cateogry.m
//  005_NSStringCategory
//
//  Created by sunhaiyan on 16/2/23.
//  Copyright © 2016年 baidu. All rights reserved.
//

#import "NSMutableString+HY.h"

@implementation NSMutableString(HY)

- (HYBlock)add {
    return ^(NSString *str) {
        if (str) {
            [self appendString:str];
        }
        return self;
    } ;
}

- (HYBlock2)replace;
{
    return ^(NSString *oldStr,NSString *newStr) {
        if (oldStr && newStr) {
            [self replaceOccurrencesOfString:oldStr withString:newStr options:NSCaseInsensitiveSearch range:NSMakeRange(0, [self length])];
        }
        return self;
    };
}

@end
